ddddmmmmPPPPaaaarrrraaaammmmssss: ddddmmmmPPPPaaaarrrraaaammmmssssCCCCrrrreeeeaaaatttteeee, ddddmmmmPPPPaaaarrrraaaammmmssssDDDDeeeessssttttrrrrooooyyyy - create and destroy digital
Parameter/value lists are used by the Digital Media Libraries to hold
configuration information about digital video and movies. There are
standard parameters that apply to images (for video and movies) and
standard parameters that apply to audio (for movies).
The function ddddmmmmPPPPaaaarrrraaaammmmssssCCCCrrrreeeeaaaatttteeee is used to create a new (empty)
parameter/value list. This can be filled in one of several ways: (1)
using the generic "set" functions such as ddddmmmmPPPPaaaarrrraaaammmmssssSSSSeeeettttIIIInnnntttt, (2) using a
function to set up the standard parameters for images or audio
(ddddmmmmSSSSeeeettttIIIImmmmaaaaggggeeeeDDDDeeeeffffaaaauuuullllttttssss and ddddmmmmSSSSeeeettttAAAAuuuuddddiiiiooooDDDDeeeeffffaaaauuuullllttttssss), or (3) using a function from
one of the digital media libraries (such as mmmmvvvvSSSSeeeettttMMMMoooovvvviiiieeeeDDDDeeeeffffaaaauuuullllttttssss). If
there is sufficient memory to allocate the structure, a pointer to it is
put into *_p_a_r_a_m_s, and DDDDMMMM____SSSSUUUUCCCCCCCCEEEESSSSSSSS is returned. Otherwise, DDDDMMMM____FFFFAAAAIIIILLLLUUUURRRREEEE is
returned.
ddddmmmmPPPPaaaarrrraaaammmmssssDDDDeeeessssttttrrrrooooyyyy frees a parameter/value list and all of its contents.
In order to simplify memory management, ddddmmmmPPPPaaaarrrraaaammmmssssCCCCrrrreeeeaaaatttteeee is the only
function that will create a parameter/value list, and ddddmmmmPPPPaaaarrrraaaammmmssssDDDDeeeessssttttrrrrooooyyyy is
the only function that will free one. This means that parameter/value
lists are managed correctly when every call to create one is balanced by
a call to destroy one.
The following example creates a parameter/value list and uses it to
configure a new movie file:
EEEEXXXXAAAAMMMMPPPPLLLLEEEE
DMparams* params;
if ( dmParamsCreate( ¶ms ) != DM_SUCCESS ) {
printf( "Out of memory.\n" );
exit( 1 );
}
if ( mvSetMovieDefaults(params, MV_FORMAT_SGI_3) != DM_SUCCESS ) {
printf( "Out of memory.\n" );
exit( 1 );
}
if ( mvCreateFile("temp.mv", params, NULL, &movie) != DM_SUCCESS ) {